
const storemsg = {

    state: {
        //侧边栏显示状态
        navBool: false,
        //用户房屋信息
        tableData: [],
        //编辑弹窗显示状态
        dialogVisible: false,
        //编辑框信息
        editForm: {},
        //增加弹窗显示状态
        addDialogVisible: false,
        //增加框信息
        addForm: {},
        //停业弹窗显示状态
        openClose: false,
        //营业弹窗显示状态
        openOpen: false,
        //营业or停业状态
        ocState: true,
    },
    getters: {
    },
    mutations: {
        //改变侧边栏状态
        setNavBool(state: any) {
            state.navBool = !state.navBool
        },
        //修改编辑弹窗显示状态
        changeDialog(state: any) {
            state.dialogVisible = !state.dialogVisible
        },
        //编辑框信息
        showEdit(state: any, obj: any) {
            state.editForm = JSON.parse(JSON.stringify(obj))
            // console.log(state.editForm);
        },
        //修改新增弹窗显示状态
        changeAddDialog(state: any) {
            state.addDialogVisible = !state.addDialogVisible
        },
        //新增框信息
        showAddEdit(state: any, obj: any) {
            state.addForm = JSON.parse(JSON.stringify(obj))
            // console.log(state.addForm);
        },
        //修改编辑弹窗显示状态
        changeClose(state: any) {
            state.openClose = !state.openClose
        },
        //修改编辑弹窗显示状态
        changeOpen(state: any) {
            state.openOpen = !state.openOpen
        },
        //修改编辑弹窗显示状态
        changeState(state: any) {
            state.ocState = !state.ocState
        },
    },
    actions: {
        SETNAVBOOL(context: any) {
            context.commit('setNavBool')
        },
        HANDLEDELETE(context: any, obj: any) {
            context.commit('handleDelete', obj)
        }
    },
}
export default storemsg;